package Server.Sessions;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class ActiveSessions {
	private Collection<ClientSession> sessionList = new ArrayList<ClientSession>(); 

	public synchronized void addSession(ClientSession s) { // this lukku!
		sessionList.add(s);
		System.out.println("Saabus uus klient: " + s);
	}

	public synchronized Iterator<ClientSession> iterator() {
		return sessionList.iterator();
	}

	public int sessionListSize() {
		return sessionList.size();
	}
}